package thread;

public class ThreadInfoDemo {
    public static void main(String[] args) {
        Thread main = Thread.currentThread();
        System.out.println(main);
        doSome();//主线程调用doSome方法
    }
    public static void doSome(){
        Thread doSome = Thread.currentThread();
        System.out.println(doSome);
        System.out.println("线程的名字："+doSome.getName());
        System.out.println("线程的id："+doSome.getId());
        System.out.println("线程的优先级："+doSome.getPriority());
        System.out.println("线程是否活着："+doSome.isAlive());
        System.out.println("线程是否是守护线程："+doSome.isDaemon());
        System.out.println("线程是否被中断："+doSome.isInterrupted());
    }
}
